Telegram Group & Telegram Channel
Гарантирует ли ExecutorService корректное завершение всех задач, если вызвать shutdown()?

Нет, вызов shutdown() не гарантирует завершение всех задач. Это только инициирует процесс корректного завершения, но не блокирует выполнение текущих задач. После вызова shutdown():

— Уже выполняющиеся задачи продолжат работать.
— Новые задачи приниматься не будут.

Чтобы убедиться, что все задачи завершены, нужно дополнительно использовать метод awaitTermination(). Он блокирует выполнение потока до тех пор, пока все задачи не завершатся или пока не истечет тайм-аут.

🐸 Библиотека собеса по Java
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/java_interview_lib/861
Create:
Last Update:

Гарантирует ли ExecutorService корректное завершение всех задач, если вызвать shutdown()?

Нет, вызов shutdown() не гарантирует завершение всех задач. Это только инициирует процесс корректного завершения, но не блокирует выполнение текущих задач. После вызова shutdown():

— Уже выполняющиеся задачи продолжат работать.
— Новые задачи приниматься не будут.

Чтобы убедиться, что все задачи завершены, нужно дополнительно использовать метод awaitTermination(). Он блокирует выполнение потока до тех пор, пока все задачи не завершатся или пока не истечет тайм-аут.

🐸 Библиотека собеса по Java

BY Библиотека собеса по Java | вопросы с собеседований


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_interview_lib/861

View MORE
Open in Telegram


Библиотека собеса по Java | вопросы с собеседований Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Work?

Bitcoin is built on a distributed digital record called a blockchain. As the name implies, blockchain is a linked body of data, made up of units called blocks that contain information about each and every transaction, including date and time, total value, buyer and seller, and a unique identifying code for each exchange. Entries are strung together in chronological order, creating a digital chain of blocks. “Once a block is added to the blockchain, it becomes accessible to anyone who wishes to view it, acting as a public ledger of cryptocurrency transactions,” says Stacey Harris, consultant for Pelicoin, a network of cryptocurrency ATMs. Blockchain is decentralized, which means it’s not controlled by any one organization. “It’s like a Google Doc that anyone can work on,” says Buchi Okoro, CEO and co-founder of African cryptocurrency exchange Quidax. “Nobody owns it, but anyone who has a link can contribute to it. And as different people update it, your copy also gets updated.”

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

Библиотека собеса по Java | вопросы с собеседований from br


Telegram Библиотека собеса по Java | вопросы с собеседований
FROM USA